/*
 *   AS IS License
 * ==Naive Coders==
 */
package org.naive.metawatch.converter.cap;

import org.naive.metawatch.converter.parser.FieldSize;
import org.naive.metawatch.converter.parser.ParsedInt;
import org.naive.metawatch.converter.parser.cap.CapParseable;

/**
 *
 * @author gbu.000
 */
public class CapClassRef extends CapParseable {

    @ParsedInt(FieldSize.SHORT)
    public short internal_class_ref;

    public boolean isInternalClass() {
        return (internal_class_ref & 0x1) == 0;
    }

    public byte getExternalPackageToken() {
        return (byte) (internal_class_ref & 0xFF);
    }

    public byte getExternalClassToken() {
        return (byte) ((internal_class_ref >> 8) & 0xFF);
    }
}
